<?php
		// création du template $t
		$t = new Template("templates/"); 
		include	"select_msg.php";
		
		$bantitle = "School Theme";
		$connexion = array("EMAIL","PASSWORD");
		$inscription = array("Prenom", "Nom", "Date de naissance", "Sexe", "Adresse Email", "Ville", "Nouveau mot de passe");
		// ici je definit les fichiers tpl
		$t->set_file(array(
		"deco"=>"acceuil_deco.tpl",
		"head"=>"html_head.tpl",
		"banniere"=>"banniere.tpl",
		"connexion"=>"connexion.tpl",
		"inscription"=>$inscri,
		"pied"=>"pied.tpl"
		));
		if (isset($reinscrip))
			$t->set_file("input", $reinscrip);
		// traitement des lignes des tableaux
		reset($connexion);
		reset($inscription);

		/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
		/* INITIALISATION DES TEMPLATES*/
		$t->set_var("ACCUEIL_DECO", $_SESSION['css']['accueil_deco']);
		$t->parse("HEAD", "head", true);
		$t->set_var("BANTITLE", $bantitle); 
		$t->parse("BANNIERE", "banniere", true);
		//menu de connexion
		list($mail,$pwd) = $connexion;
		$t->set_var(array(
		"MAIL"=>$mail,
		"PWD"=>$pwd
		));
		$t->parse("CONNEXION","connexion",true);
		//menu inscription
		list($prenom,$nom, $bday, $sexe, $new_mail, $ville, $new_pwd) = $inscription;
		$t->set_var(array(
		"PRENOM"=>$prenom,
		"NOM"=>$nom,
		"BDAY"=>$bday,
		"SEXE"=>$sexe,
		"NEW_MAIL"=>$new_mail,
		"VILLE"=>$ville,
		"NEW_PWD"=>$new_pwd
		));
		
		$t->parse("INSCRIPTION","inscription",true);
		if (isset($reinscrip))
			$t->parse("INPUT", "input", true);
		$t->parse("PIED", "pied", true);
		/* FIN INITIALISATION */
		/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

		// traitement du tpl et affichage
		$t->pparse("MyOutput","deco");
?>
